import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/cupertino.dart';

class BottomSelectViewState implements Cloneable<BottomSelectViewState> {
  var items = [];
  var searchItems = [];
  String title = '请选择';
  bool showSearch = false;
  bool isSearching = false;
  TextEditingController textEditingController = TextEditingController();

  @override
  BottomSelectViewState clone() {
    return BottomSelectViewState()
      ..title = title
      ..searchItems = searchItems
      ..textEditingController = textEditingController
      ..showSearch = showSearch
      ..isSearching = isSearching
      ..items = items;
  }
}

BottomSelectViewState initState(Map<String, dynamic> args) {
  return BottomSelectViewState()
    ..title = args['title']
    ..showSearch = args['showSearch'] ?? false
    ..items = args['items'];
}
